<%@ page import="java.util.List" %>
<%@ page import="com.workmanager.util.springUtil" %>
<%@ page import="com.workmanager.service.TeacherClassService" %>
<%@ page import="com.workmanager.bean.ClassBean" %>
<%@ page import="java.util.ArrayList" %>
<%--
  Created by IntelliJ IDEA.
  User: liao
  Date: 2016/8/23
  Time: 11:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../inc/top.jsp"%>
<script src="<%=ctxpath%>/static/teacher/js/manageClasses.js"></script>
<link href="<%=ctxpath%>/static/teacher/css/manageClasses.css" rel="stylesheet" />
<link href="<%=ctxpath%>/static/v3/bk.css?v=1.0.1" rel="stylesheet"/>
<link href="<%=ctxpath%>/static/v3/font-awesome.css" rel="stylesheet"/>
<%
    List<ClassBean> list = (List<ClassBean>) request.getAttribute("list");
%>
<input type="hidden" id="hidden" value="<%=tea.getTeacher_id()%>"><!-- teacher_id-->
<div class="panel panel-default table7_demo">
<div class="panel-heading">
    <span style="font-size: 16px;font-weight:bolder;">建立管理班级</span>
</div>
        <div id="div1">
        <ul class="nav nav-tabs king-nav-tabs" >
            <li class="active" id="class"><a href="#home"  data-toggle="tab"><span class="span">班级列表</span></a></li>
            <li><a href="#iso" data-toggle="tab"><span class="span">添加班级</span></a></li>
        </ul>
        </div>
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
                <p></p>
                <%if(list.isEmpty()){%>
                <div id="ti">
                <img src="../media/img/teacher/1.png" class="img"/>
                <span class="span1">还未建立班级，快去建立吧!</span>
                </div>
                <%}else{%>
                <table class="table table-hover table-bordered">
                    <tr>
                        <th>序号</th>
                        <th>班级*</th>
                        <th>人数</th>
                        <th>容量*</th>
                        <th>操作</th>
                    </tr>
                    <%for(ClassBean cb : list){%>
                    <tr id="tr<%=cb.getClass_id()%>">
                        <td id="td<%=cb.getClass_id()%>"><%=cb.getClass_id()%></td>
                        <td><%=cb.getClass_name()%></td>
                        <td><%=cb.getClass_number()%></td>
                        <td><%=cb.getClass_size()%></td>
                        <td class="td2"><a href="#" onclick="changeClass(this)">【修改】</a>
                            <a href="#" class="del">【删除】</a>
                            <a href="<%=ctxpath%>/TeacherController/getClassDetails.wm?classsId=<%=cb.getClass_id()%>">【查看详情】</a>
                        </td>
                    </tr>
                    <%}}%>
                </table>
            </div>
            <div class="tab-pane fade" id="iso">
                <div id="addDiv">
                <div class="useDiv form-group">
                    <img src="../media/img/teacher/4.png" class="img"/>
                    <span class="span">班级名称:</span>
                    <input type="text" id="add" name="add" placeholder="班级名称"/>
                </div>
                <div class="useDiv form-group">
                    <img src="../media/img/teacher/5.png" class="img"/>
                    <span class="span">班级容量:</span>
                   <select id ="sel">
                       <%for(int i = 0 ;i<120;i++){%>
                            <option id="op"<%=i+1%> value=<%=i+1%>><%=i+1%></option>
                       <%}%>
                   </select>
                </div>
                <div class="useDiv">
                    <img src="../media/img/teacher/6.png" class="img"/>
                    <span class="span">班级简介:</span>
                    <textarea class="textarea" rows="6" id="textarea">
                    </textarea>
                </div>
                <div class="useDiv form-group">
                    <button class="king-btn-demo king-btn king-border king-round king-success" title="保存">添加</button>
                </div>
                </div>
            </div>
            <div class="tab-pane" id="hide">
                <p>隐藏班级</p>
                <table class="table table-hover table-bordered">
                    <tr>
                        <th>序号</th>
                        <th>班级*</th>
                        <th>人数</th>
                        <th>容量*</th>
                        <th>操作</th>
                    </tr>
                </table>
            </div>
        </div>
    <div class="col-md-4">
    </div>
</div>
<%@include file="../inc/bottom.jsp"%>